package com.ruoyi.APPMS.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.APPMS.domain.Buypart;
import com.ruoyi.APPMS.mapper.BuypartMapper;
import com.ruoyi.APPMS.mapper.PurchasevehicleMapper;
import com.ruoyi.APPMS.service.IBuypartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 购买零部件Service业务层处理
 *
 * @author 任容
 * @date 2023-07-03
 */
@Service
public class BuypartServiceImpl extends ServiceImpl<BuypartMapper, Buypart> implements IBuypartService {
    @Autowired
    private BuypartMapper buypartMapper;

    @Override
    public List<Buypart> list(Buypart buypart) {
        return buypartMapper.list(buypart);
    }

    @Override
    public Buypart listByid(Long partid) {
        return buypartMapper.listByid(partid);

    }

    @Override
    public boolean createOrder1(Buypart buypart) {
        return buypartMapper.createOrder1(buypart) > 0;
    }

    @Override
    public boolean createOrder2(Buypart buypart) {
        return buypartMapper.createOrder2(buypart) > 0;
    }
}
